/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package cpasl;

import static cpasl.VideoGroup.VIDEO_HEIGHT;
import static cpasl.VideoGroup.VIDEO_WIDTH;
import javafx.geometry.Rectangle2D;
import javafx.scene.Group;
import javafx.scene.control.Label;
import javafx.scene.shape.Rectangle;
import javafx.stage.Screen;

/**
 *
 * @author seanm_000
 */
public class VideoChoiceBlank extends Group {
    
    private static final int VIDEO_WIDTH = 320;
    
    private static final int VIDEO_HEIGHT = 240;
    
    private final static int LABEL_Y_OFFSET = 40;
    
    private Label labelA = new Label("A");
    
    private Label labelB = new Label("B");
    
    private Label labelUnknown = new Label("?");
    
    private Rectangle rectangleA = null;
    
    private Rectangle rectangleB = null;
    
    private Rectangle rectangleUnknown = null;
    
    private int aX = 0;
    
    private int bX = 0; 
    
    protected int centerX = 0;
    
    protected int centerY = 0;
    
    public VideoChoiceBlank() {
        Rectangle2D primaryScreenBounds = Screen.getPrimary().getVisualBounds();
        centerX = (int) (primaryScreenBounds.getWidth()/2) - (VIDEO_WIDTH/2);
        centerY = (int) (primaryScreenBounds.getHeight()/2) - (VIDEO_HEIGHT/2);
        aX = (int) (primaryScreenBounds.getWidth() * 0.25) - (VIDEO_WIDTH/2);
        bX = (int) (primaryScreenBounds.getWidth() * 0.75) - (VIDEO_WIDTH/2);
        labelA.setTranslateX((primaryScreenBounds.getWidth() * 0.25) - (labelA.getPrefWidth()/2));
        labelA.setTranslateY(centerY-LABEL_Y_OFFSET);
        rectangleA = new Rectangle(aX, centerY, VIDEO_WIDTH, VIDEO_HEIGHT);
        labelB.setTranslateX((primaryScreenBounds.getWidth() * 0.75) - (labelB.getPrefWidth()/2));
        labelB.setTranslateY(centerY-LABEL_Y_OFFSET);
        rectangleB = new Rectangle(bX, centerY, VIDEO_WIDTH, VIDEO_HEIGHT);
        labelUnknown.setTranslateX((primaryScreenBounds.getWidth() * 0.5) - (labelUnknown.getPrefWidth()/2));
        labelUnknown.setTranslateY(centerY-LABEL_Y_OFFSET);
        rectangleUnknown = new Rectangle(centerX, centerY, VIDEO_WIDTH, VIDEO_HEIGHT);    
        getChildren().add(labelA);
        getChildren().add(rectangleA);
        getChildren().add(labelB);
        getChildren().add(rectangleB);
        getChildren().add(labelUnknown);
        getChildren().add(rectangleUnknown);
    }
    
}
